package org.footito.android.application;

import org.acra.ACRA;
import org.acra.annotation.ReportsCrashes;
import org.footito.android.connexion.Connexion;

import android.app.Application;

@ReportsCrashes(formKey = "dFIxVV8zcXQ5VmY1bDU4cHpqdzlEbmc6MQ") 
public class FootitoApplication extends Application {
	private static FootitoApplication instance;
	private Connexion connexion;

	public FootitoApplication() {
		super();
		instance = this;
	}

	public Connexion getConnexion() {
		if (connexion == null)
			connexion = new Connexion(this);
		return connexion;
	}

	public static FootitoApplication getApplicationInstance() {
		return instance;
	}
	
	@Override
	public void onCreate() {
        ACRA.init(this);
		super.onCreate();
	}
}
